package choose.student1;

public class Group {
    private int groupid;
    private String groupname;
    private Student[] students;
    private Class aClass;
    public Group(int groupid,String groupname,Class aClass){
        this.groupid=groupid;
        this.aClass=aClass;
        this.groupname=groupname;
        this.students=new Student[2];
    }
    public void addstudent(Student student){
        for(int i=0;i< students.length;i++){
            if(students[i]==null){
                students[i]=student;
                break;
            }
        }
    }

    public String getGroupname() {
        return groupname;
    }

    public int getGroupid() {
        return groupid;
    }

    public Student[] getStudents() {
        return students;
    }
}
